package ooday05;

//import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer;
import com.sun.xml.internal.ws.api.model.wsdl.WSDLOutput;

//枚举的演示
public class EnumDemo {
    public static void main(String[] args) {
        Season[] seasons=Season.values();//获取所有枚举的对象，返回枚举对象的数组
        for (int i=0;i<seasons.length;i++){//输出所有枚举对象
            System.out.println(seasons[i]);
            System.out.println(seasons[i].getSeasonName());//输出枚举的名字属性
            System.out.println(seasons[i].getSeasonDesc());//输出枚举的描述属性
        }

        Season season=Season.SPRING;//获取SPRING对象
        System.out.println(season.getSeasonName()+"，"+season.getSeasonDesc());
        switch (season){
            case SPRING:
                System.out.println("天气"+season.getSeasonDesc()+"，我们放风筝去了");
                break;
            case SUMMER:
                System.out.println("天气"+season.getSeasonDesc()+"，我们游泳去了");
                break;
            case AUTUMN:
                System.out.println("天气"+season.getSeasonDesc()+",我们爬山去了");
                break;
            case WINTER:
                System.out.println("天气"+season.getSeasonDesc()+"，我们滑雪去了");
                break;
        }




    }
}
